

var api = require('../../utils/api.js');
var app = getApp();


Page({

    /**
     * 页面的初始数据
     */
    data: {

    },
    onShow(){
        var that=this;

        api.post({
            url: 'index/getAddress',
            data: {},
            success: data => {
                console.log(data)
                that.setData({
                    address:data.data
                })
            }
        })

    },
    getadd(ret){
        console.log(ret);
        var name=ret.currentTarget.dataset.name;

        wx.setStorageSync('address', name)

        wx.navigateBack();
    }
})